<?php
	$mod_name = "menu";

	include_once(realpath(dirname(__FILE__).'/../../conf.php'));
	include_once("$GLOBALS[dir_interface]/IModule.php");
	include_once("$GLOBALS[dir_abstract]/AModule.php");
	include_once("$GLOBALS[dir_class]/CCore.php");
	include_once("$GLOBALS[dir_class]/CLayout.php");

	class MMenu extends AModule implements IModule
	{
		private $layout;

		public function __construct($name = "mnu")
		{
			$this->name = $name;
		}

		public function __destruct()
		{
		}

		public function inizialize()
		{
			$this->layout = new CLayout($this->name);
			$this->_window_title = new MHtml("CineWorld");
		}

		public function run()
		{
			$this->layout->loadLayout("$GLOBALS[dir_module]/menu/layout/default.xml");
			$this->layout->instanceGroup("menu", "menu1");
			$this->layout->instanceGroup("items", "items1");
			$this->layout->instanceGroup("items", "items2");
			$this->layout->instanceGroup("items", "items3");
			$this->layout->instanceGroup("items", "items4");
			$this->layout->instanceGroup("items", "items5");

			$this->layout->setModule("menu1", "title", $this->_window_title);
			$this->layout->setModule("items1", "item", $this->_window_title);

			$this->layout->instanceGroup("menu", "asd2");
		}

		public function display()
		{
			return $this->layout->display();
		}

		public function terminate()
		{
		}
	}

?>